package level4Assessment;

abstract class ParkingTransaction 
{
	protected static int transactionNum =1;
	
	
	public abstract double calculateTotalCost();
	public void displayToTerminal(String registrationNumber, double hoursStaying, double parkingCost)
	{
		System.out.println("Transaction :" + transactionNum + " Registration : " + registrationNumber);
		if(hoursStaying <= 1)
		{
			System.out.println("Length of Stay : " + Math.round(hoursStaying) + " hour");
		}
		else
		{
			System.out.println("Length of Stay : " + hoursStaying + " hours");
		}
		
		System.out.println("Amount Due : " + parkingCost);
	}
}
